//
//  YZillTypeTableViewController.m
//  kuaiyi
//
//  Created by wyman on 16/5/6.
//
//

#import "YZillTypeTableViewController.h"

@interface YZillTypeTableViewController ()
@property (nonatomic, strong) NSArray *illType;

@end

@implementation YZillTypeTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.illType = @[@"肿瘤",@"血液病",@"心脑血管病",@"神经系统",@"骨科病"];

}


-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.illType.count;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSString *ID = @"type";
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
   
    if (cell == nil) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];

    }
  
    cell.textLabel.text = self.illType[indexPath.row];
    cell.textLabel.textColor = [UIColor blackColor];
    cell.textLabel.textAlignment = NSTextAlignmentLeft;
    cell.textLabel.font = [UIFont systemFontOfSize:15];
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    
    
    return cell;
    
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

    [self.navigationController popViewControllerAnimated:YES];
    
    self.illTypeblock(self.illType[indexPath.row]);
    
}
@end
